<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>WebSocket Chat</title>
</head>
<body>
<div id="chat">
    <div id="messages" style="height: 300px; overflow-y: scroll; border: 1px solid #ccc;"></div>
    <input type="text" id="messageInput" placeholder="输入消息..."/>
    <button onclick="sendMessage()">发送</button>
</div>
<script src="chat.js"></script>
</body>
</html>